import Vue from "vue";
import VueRouter from "vue-router";
import storeManage from "./components/storeManage/stroeManage.vue";
import storeGoods from "./components/store/stroeGoods.vue";
import storeOrder from "./components/store/storeOrder.vue";
import storeMoneyCount from "./components/store/storeMoneyCount.vue";
import serveManage from './components/store/serveManage';
import salesStatistics from './components/store/Statistics/salesStatistics'
import countStatistics  from './components/store/Statistics/countStatistics'
Vue.use(VueRouter);
export default new VueRouter({
  mode: 'history',//有历史记录 可以后退
  routes: [
    {
        //每一个链接都是一个对象
        path: "/", //链接路径
        name: "storeManage", //路由名称，
        component: storeManage //对应的组件模板
      },
    {
      //每一个链接都是一个对象
      path: "/storeManage", //链接路径
      name: "storeManage", //路由名称，
      component: storeManage,children:[//对应的组件模板
        {path: "storeGoods",component: storeGoods },
        {path: "storeOrder",component: storeOrder },
        {path: "storeMoneyCount",component: storeMoneyCount },
        { path: 'serveManage', component:serveManage},
        { path: 'salesStatistics', component:salesStatistics},
        { path: 'countStatistics', component:countStatistics}
      ] 
    },
  ]
});
